package com.littrabble.sort;

public class Main {

	public static void main(String[] args) {
		
		int n = 20;
		int[] source = randomDataForHeap(n);
		
		Quick.sort(source, n, 0, n-1);
		
		print(source);
	}
	
	public static void print(int[] data) {
		
		for(int i=0;i<data.length;i++) {
			System.out.print(data[i] + ",");
		}
		
		System.out.println();
	}
	
	public static int[] randomDataForHeap(int n) {
		int[] data = new int[n + 1];

		for (int i = 1; i <= n; i++) {
			data[i] = (int) (Math.random() * 100) + 1;
		}

		return data;
	}

	public static int[] randomData(int n) {
		int[] data = new int[n];

		for(int i=0;i<n;i++) {
			data[i] = (int) (Math.random() * 100) + 1;
		}
		
		return data;
	}
}
